#ifndef _CONSTANTS_H_
#define _CONSTANTS_H_

#ifdef _WIN32
#pragma once
#endif

/**
 * A namespace to hold important constants used throughout the program
 *
 * 03/03/2012 - Steven Hartin - Fixed Vectors not working with initialization 
 *                              lists, made all the variables constant as they
 *                              will not work as variables due to the nature
 *                              of being redeclared if placed in the header.
 *                              We either have to use const, or extern keyword
 *                              to stop redeclarations.
 * 02/03/2012 - Stephen Gore - Created the Namespace
 *
 */


#ifndef DIRECTINPUT_VERSION
#define DIRECTINPUT_VERSION 0x0800
#endif

#include "d3dx9.h"
#include "dinput.h"

namespace Constants 
{

    // Look at matrix
    const D3DXVECTOR3 CAMERA_POSITION(448.0f, 1000.0f, -300.0f);
    //const D3DXVECTOR3 CAMERA_POSITION(0.0f, 200.0f, 0.0f);
    const D3DXVECTOR3 CAMERA_UP(0.0f, 1.0f, 0.0f);
    const D3DXVECTOR3 CAMERA_LOOKAT(448.0f, 1000.0f, 515.0f);

    // Perspective matrix
    const float CAMERA_FIELD_OF_VIEW (D3DX_PI/4);
    const float CAMERA_ASPECT_RATIO (16.0f / 9.0f);
    const float CAMERA_Z_NEAR_PLANE (1.0f);
    const float CAMERA_Z_FAR_PLANE (10000.0f);

    // Window sizes.
    const int WINDOW_WIDTH(1280);
    const int WINDOW_HEIGHT(720);

    // Initial start positions of the window.
    const int WINDOW_START_X(100);
    const int WINDOW_START_Y(100);

    const float TILE_SIZE(64.0f);

    // Map
    const short int CURRENT_MAP_VERSION = 3;
    // The amount a player's speed is increase by after pickup up a speed
    // buff.
    const float BUFF_SPEED_INCREASE = 0.2f;

    // Player 1 keys
    const long PLAYER_1_UP_KEY = DIK_W;
    const long PLAYER_1_DOWN_KEY = DIK_S;
    const long PLAYER_1_LEFT_KEY = DIK_A;
    const long PLAYER_1_RIGHT_KEY = DIK_D;
    const long PLAYER_1_BOMB_KEY = DIK_LSHIFT;

    // Player 2 keys
    const long PLAYER_2_UP_KEY = DIK_UP;
    const long PLAYER_2_DOWN_KEY = DIK_DOWN;
    const long PLAYER_2_LEFT_KEY = DIK_LEFT;
    const long PLAYER_2_RIGHT_KEY = DIK_RIGHT;
    const long PLAYER_2_BOMB_KEY = DIK_NUMPAD0;

    const double PI = 3.141592653589793238462643383279502884;

    const float GRAVITY = 9.81f;

    typedef enum CHEAT_MODE
    {
        NO_CHEAT = 0x00,
        GODMODE = 0x01,
        OCCUPIED_BOUNDING_BOXES = 0x02,
        BOUNDING_BOXES = 0x04
    };
}

#endif